[IA64] memory exchange: ia64 counter part of cs 10353 xen-unstable.hg
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 23 Jun 2006 21:12:10 +0000 (15:12 -0600)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 23 Jun 2006 21:12:10 +0000 (15:12 -0600)
IA64 counter part of the change set
10353:bd1a0b2bb2d4596227951ad6d36cb4fcc2d00a8e of xen-unstable.hg
Only destroy a machine-contiguous memory region if it really is contiguous.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c

index a4062735136b2d890204577cdae279fadb51db4f..150e54e7d7c478be534c4f256b825a5deeaec797 100644 (file)
@@ -275,6 +275,9 @@ __xen_destroy_contiguous_region(unsigned long vstart, unsigned int order)
        struct xen_memory_reservation reservation;
        unsigned long i;
 
+       if (!test_bit(start_gpfn, contiguous_bitmap))
+               return;
+
        gpfns = kmalloc(sizeof(gpfns[0]) * num_gpfn,
                        GFP_KERNEL | __GFP_NOFAIL);
        for (i = 0; i < num_gpfn; i++) {